#ifndef GRAPHICSFRAMEMODEL_H
#define GRAPHICSFRAMEMODEL_H

#include <QObject>
#include <QGraphicsScene>
#include "CommonMarcro.h"
#include "animationdatahandler.h"
#include <QGraphicsRectItem>


class GraphicsFrameModel : public QObject
{
    Q_OBJECT
public:
    explicit GraphicsFrameModel(AnimationDataHandler* coreData, QObject *parent = 0);
    ~GraphicsFrameModel();

    inline QGraphicsScene* getScene(){return m_scene;}
    void setWorkingDir(QString& workingDir);
    inline void setViewRect(QRect rect){m_viewRect = rect;}
signals:
    void notifyDisplayUpdate();

public slots:
    void dataChangeUpdate();
private:
    QGraphicsScene* m_scene;

    QGraphicsPixmapItem* m_item;
    AnimationDataHandler* m_coreData;


    QString m_workingDir;
    QString m_fullFileName;
    QPixmap* m_fullPixMp;

    QRect m_viewRect;
private:
    static const int ROTATE;



private:
    void clearAllData();

};

#endif // GRAPHICSFRAMEMODEL_H
